home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991: Code Warrior / bincue / Code Warrior.bin / Development Platforms (Moof!) / LISP Related / Goal-Plan-Code Editor / library / my-extensions.lisp < prev    next >
Encoding:
Text File  |  1990-07-06  |  3.0 KB  |  78 lines  |  [TEXT/CCL ]

  1.  
  2. ;=====================================================================
  3. ;  GPC Editor
  4. ;
  5. ;  Name: my-extensions.lisp
  6. ;  
  7. ;  Lisp extensions used in the Goal Plan Code editor.
  8. ;
  9. ;---------------------------------------------------------------------
  10. ; Date        Name  Comments   
  11. ;---------------------------------------------------------------------
  12. ; 10/12/88    lhh   Initial Documentation
  13. ; 10/13/88    lhh   "Lispizing" of Documentation
  14. ;=====================================================================
  15.  
  16. ;;; Load in the initial set of files and set *modules*
  17. (provide 'my-extensions)
  18. (require 'fred-extensions) ;a few cheap hacks like C-x o = other win
  19. (require 'keymacros)       ;mvmt+sel keys, winmnager,comment boxes, history
  20.  
  21. ;overview Binds things defined in KEYMACROS. BInds Funckeys. 
  22.  
  23. ;;;line-by-line history.  BUG: It skips command lines exactly one line above
  24. ;;;the current command line when moving up, but one can move back down to them.
  25. (comtab-set-key *listener-comtab* '(:meta #\uparrow)
  26.                 #'(lambda () (to-nearest-cmnd-line :up))
  27.                 "Moves up one command line.")
  28. (comtab-set-key *listener-comtab* '(:meta #\downarrow)
  29.                 #'(lambda () (to-nearest-cmnd-line :down))
  30.                 "Moves down one command line.")
  31.  
  32.  
  33. ;;;rotate the list of windows through the front position.
  34. (def-fred-command (:control #\uparrow) up-a-window)
  35. (def-fred-command (:control #\downarrow) down-a-window)
  36.  
  37. ;;;do function keys as parts of control-p-comtab
  38. (comtab-set-key *comtab* (code-char 16)
  39.                 #'(lambda () 
  40.                     (funkey-despatch (ldb (byte 8 8) 
  41.                                           (rref *current-event* event.message)))))
  42.  
  43.  
  44.  
  45. ;;;switch the enter and control-x-control-c keys, and return and control-return keys
  46. (def-fred-command #\return ccl::ed-newline-and-indent)
  47. (def-fred-command (:control #\return) ccl::ed-self-insert)
  48.  
  49. ;;;comment posters for 5 levels
  50. ;
  51. ;?????
  52. ;   why 5 levels? why not 6? or 1?
  53. ;?????
  54. (comtab-set-key *control-x-comtab* #\1 #'(lambda () (comment-graphics 1)))
  55. (comtab-set-key *control-x-comtab* #\2 #'(lambda () (comment-graphics 2)))
  56. (comtab-set-key *control-x-comtab* #\3 #'(lambda () (comment-graphics 3)))
  57. (comtab-set-key *control-x-comtab* #\4 #'(lambda () (comment-graphics 4)))
  58. (comtab-set-key *control-x-comtab* #\5 #'(lambda () (comment-graphics 5)))
  59.  
  60.  
  61. (when (find :window-stacker *features*)
  62.   (comtab-set-key *control-p-comtab* #\5 
  63.                   #'(lambda () (push-window))
  64.                   "F5 - push-window")
  65.   (comtab-set-key *control-p-comtab* #\6 
  66.                   #'(lambda () (pull-window))
  67.                   "F6 - pull-window")
  68.   (comtab-set-key *control-p-comtab* #\7 
  69.                   #'(lambda () (flip-window-stack))
  70.                   "F7 - flip-window-stack")
  71.   (comtab-set-key *control-p-comtab* #\8 
  72.                   #'(lambda () (clean-up-window-stack))
  73.                   "F8 - clean-up-window-stack"))
  74.  
  75. ;;; add the features defined in this file to the global set of features provided
  76. ;;; by this implementation
  77. (pushnew :my-extensions *features*)